package Thread2;

/**
 * @Author wangzhipeng
 * @Date 2020-08-20 3:21 下午
 * @Description 演示守护线程，一旦被守护线程结束，守护线程也结束
 */
public class DaremenDemo {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                while (true){
                    System.out.println("我是守护线程");
                }
            }
        }).start();

        System.out.println("main方法结束了");



    }


}
